//
//  LRXSpotView.m
//  路人侠
//
//  Created by zhangxulong on 2/13/16.
//  Copyright © 2016 zhangxulong. All rights reserved.
//

#import "LRXSpotView.h"


@interface LRXSpotView()
@end
@implementation LRXSpotView


- (void)drawRect:(CGRect)rect
{
    //实现裁剪图片 为圆形
    
    CGContextRef context = UIGraphicsGetCurrentContext();

    CGFloat row = 10 *wScale;
    CGRect imageRect = CGRectMake(0,0, row, row);
    CGContextAddEllipseInRect(context, imageRect);
    
    //为什么 将下面 一行 注释掉 就没与颜色了
//    CGContextClip(context);
    
    //多余的部分 剪切掉
    CGContextFillPath(context);
    
}
@end
